package com.java.simple.study.jvm.gc.gcroot;

import java.io.IOException;
import java.util.ArrayList;
import java.util.List;

/**
 * @author zhoujunlin
 * @date 2021/12/18
 * @desc 演示GCRoot
 **/
public class Demo5_1 {

    public static void main(String[] args) throws IOException {
        List<String> list = new ArrayList<>();
        list.add("a");
        list.add("b");
        System.out.println("1");
        System.in.read(); // 暂停  jmap dump

        list = null;
        System.out.println("2");
        System.in.read(); // 暂停 jmap dump

        System.out.println("结束");

    }

}
